<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .wrapper{
            width: 200px;
            height: 500px;
            margin: 100px auto;
        }
        .div1,.div2 {
            width: 200px;
            height: 100px;
            padding: 20px;
        }

        .div1 {
            background-color: #f00;
            -webkit-transform: rotateY(60deg);
            -moz-transform: rotateY(60deg);
            -ms-transform: rotateY(60deg);
            -o-transform: rotateY(60deg);
            transform: rotateY(60deg);

            /*被嵌套子元素将保留其3D位置*/
            -webkit-transform-style: preserve-3d;
            -moz-transform-style: preserve-3d;
            -ms-transform-style: preserve-3d;
            transform-style: preserve-3d;

            /*被嵌套子元素将不保留其3D位置*/
            /*-webkit-transform-style: flat;*/
            /*-moz-transform-style: flat;*/
            /*-ms-transform-style: flat;*/
            /*transform-style: flat;*/
        }

        .div2 {
            background-color: #4970ff;
            -webkit-transform: rotateY(80deg);
            -moz-transform: rotateY(80deg);
            -ms-transform: rotateY(80deg);
            -o-transform: rotateY(80deg);
            transform: rotateY(80deg);
        }
    </style>
</head>
<body>
<div class="wrapper">
    <div class="div1">div1
        <div class="div2">div2</div>
    </div>
</div>
</body>
</html>